function [result_data]=object_result_data(x,task,execution_time,task_num,task_out,task_in)
%% 租用服务器费用、时耗
instance_types=3;
task_allocation=x((instance_types+1)*2:task_num+instance_types*2+1);
deadline =0.6*sum(execution_time(:,4));                         % 工作流期限=0.9*本地执行时间
instance_id=x(2:x(1)+1);                                        % 原始instance 种类id
option_instance=x(instance_types+2:instance_types*2+1);         % 每个服务器的租用类型 reserved/on demand
reserved_price=[0.4 0.18 0.15;600 300 280];                     % 按期限购买价格
on_demand_price=[2 0.9 0.8];                                    % 按需购买价格
[finish,time_span]=task_scheduling(task,execution_time,task_allocation,instance_id,task_num,task_out,task_in);
completion_time = max(finish);                                  % 整个工作流完成时间
purchase_cost = 0;

for i = 1 : x(1)
    if(option_instance(i)==1)
        purchase_cost = purchase_cost+reserved_price(2,instance_id(i))+reserved_price(1,instance_id(i))*time_span(i);
    elseif(option_instance(i)==2)
        purchase_cost = purchase_cost+on_demand_price(instance_id(i))*time_span(i);
    end
end
%% 功耗
Power_Cost_list=[2 0.5 0.45];                            % 云服务器、边缘服务器的单位时间功耗
Power_Cost_end=0.6;                                      % 终端单位时间功耗
Power_Cost=0;
Power_Cost=Power_Cost+Power_Cost_end*time_span(4);
for i = 1 : x(1)
    Power_Cost=Power_Cost+Power_Cost_list(instance_id(i))*time_span(i);
end

%% 云配置价格、执行时间、能耗
result_data=[purchase_cost,completion_time,Power_Cost];